home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / windows / ldialogs.zip / UNIT3.PAS < prev   
Pascal/Delphi Source File  |  1996-07-25  |  969b  |  49 lines

  1. unit Unit3;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, LDialogs, StdCtrls {$IFDEF NEVER} , Dialogs, BlahBlah {$ENDIF} ;
  8.  
  9. type
  10.   TForm3 = class(TForm)
  11.     Button1: TButton;
  12.     Button2: TButton;
  13.     procedure Button1Click(Sender: TObject);
  14.     procedure Button2Click(Sender: TObject);
  15.   private
  16.     { Private declarations }
  17.     procedure CreateParams(var Params: TCreateParams); override;
  18.   public
  19.     { Public declarations }
  20.   end;
  21.  
  22. implementation
  23.  
  24. {$R *.DFM}
  25.  
  26. uses Unit2;
  27.  
  28. procedure TForm3.Button1Click(Sender: TObject);
  29. begin
  30.   Application.HelpContext(4);
  31. end;
  32.  
  33. procedure TForm3.Button2Click(Sender: TObject);
  34. var
  35.   Form2: TForm2;
  36. begin
  37.   Form2 := TForm2.Create(nil);
  38.   Form2.ShowModal;
  39.   Form2.Free;
  40. end;
  41.  
  42. procedure TForm3.CreateParams(var Params: TCreateParams);
  43. begin
  44.   inherited CreateParams(Params);
  45.   Params.WndParent := GetWindowOnTop(hInstance);
  46. end;
  47.  
  48. end.
  49.